const moduleB = {
    namespaced: true,
    state:() =>({
        countB: 20
    }),
    getters:{
        doubleCountB(state){
            return state.countB * 2
        }
    },
    mutations:{
        incrementB(state){
            state.countB++
        }
    },
    actions:{
        asyncIncrementB({commit}){
            commit("incrementB")
        },
        emitGlobalMut({commit}){
            commit("increment", {count:40}, {root:true})
        },
        emitGlobalAct({dispatch}){
            console.log('1111');
            dispatch("asyncIncrement", {count: 50}, {root: true})
        }
    }
}

export default moduleB